#include<bits/stdc++.h>
using namespace std;
const int maxn=1e5+5;
int n,a[maxn],to[maxn];
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	cin>>n;
	for(int i=1;i<=n;i++) {cin>>a[i];to[a[i]]++;}
	int ans=n,cnt=0;
	for(int i=1;i<=100000;i++){
		if(cnt>=to[i]){
			cnt-=to[i];
			ans-=to[i];
		}
		else{
			ans-=cnt;
			cnt=0;
		}
		cnt+=to[i];
	}
	cout<<ans<<endl;
    return 0;
}
